// @ts-ignore
/* eslint-disable */
import { request } from '@umijs/max';

/** 新增用户 POST /api/addUser */
export async function postAddUser(body: API.AddUserVo, options?: { [key: string]: any }) {
  return request<API.Response>('/api/addUser', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}

/** 删除用户 DELETE /api/deleteUser/${param0} */
export async function deleteDeleteUserId(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.deleteDeleteUserIdParams,
  options?: { [key: string]: any },
) {
  const { id: param0, ...queryParams } = params;
  return request<API.Response>(`/api/deleteUser/${param0}`, {
    method: 'DELETE',
    params: { ...queryParams },
    ...(options || {}),
  });
}

/** 修改用户信息 PUT /api/editUserInfo */
export async function putEditUserInfo(body: API.UpdateUserVo, options?: { [key: string]: any }) {
  return request<API.Response>('/api/editUserInfo', {
    method: 'PUT',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}

/** 查询用户信息 GET /api/searchUserInfo/${param0} */
export async function getSearchUserInfoId(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.getSearchUserInfoIdParams,
  options?: { [key: string]: any },
) {
  const { id: param0, ...queryParams } = params;
  return request<API.Response>(`/api/searchUserInfo/${param0}`, {
    method: 'GET',
    params: { ...queryParams },
    ...(options || {}),
  });
}

/** 查询用户列表 GET /api/searchUserList */
export async function getSearchUserList(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.getSearchUserListParams,
  options?: { [key: string]: any },
) {
  return request<API.Response>('/api/searchUserList', {
    method: 'GET',
    params: {
      ...params,
    },
    ...(options || {}),
  });
}
